package com.chat.business.controller;

import com.chat.business.service.IHistoryMessageService;
import com.chat.common.dto.SearchHistoryMessageDTO;
import com.chat.common.entity.HistoryMessage;
import com.chat.common.vo.R;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *
 * 消息记录
 * @author wei kunJie
 * @date 2024/4/22 16:26:24
 */
@RestController
@RequestMapping("/business/historyMessage")
public class HistoryMessageController {

    @Resource
    private IHistoryMessageService historyMessageService;

    @GetMapping("/history")
    public R<List<HistoryMessage>> getHistoryMsg(@RequestBody SearchHistoryMessageDTO searchHistoryMessageDTO){
        return historyMessageService.getHistoryMessage(searchHistoryMessageDTO);
    }
}
